package sdk.pay.model;

import java.util.ArrayList;
import java.util.List;

import sdk.pay.BuildConfig;


public final class PayInfo {
    private String mAppKey = "";
    private String mPayTypeId = "";
    private String mAppId = "";
    private String mPaySystemId = BuildConfig.SYSTEM_NAME;
    private String mKeyAES = "";
    private String mVectorAES = "";
    private List<PayTypeModel> mPayTypeModels = new ArrayList<PayTypeModel>();
    private boolean isPaying;
    private String order_channelcode = "";
    private int callType = 2;
    private String method = "";
    private String url = "";
    private String userAgent = "";
    private String postData = "";
    private String orderId = "";
    private String sign = "";
    private String action = "";
/*
* 新增get set
*
* */

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getAppKey() {
        return mAppKey;
    }

    public void setAppKey(String appKey) {
        this.mAppKey = appKey;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }


    public String getOrder_channelcode() {
        return order_channelcode;
    }

    public void setOrder_channelcode(String order_channelcode) {
        this.order_channelcode = order_channelcode;
    }

    public int getCallType() {
        return callType;
    }

    public void setCallType(int callType) {
        this.callType = callType;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getPostData() {
        return postData;
    }

    public void setPostData(String postData) {
        this.postData = postData;
    }


    public boolean getIsPaying() {
        return isPaying;
    }

    public void setIsPaying(boolean paying) {
        isPaying = paying;
    }


    public void resetPayParam() {
        order_channelcode = "123456";
        callType = 2;
        method = "";
        url = "";
        userAgent = "";
        postData = "";
        orderId = "";
        sign = "";
    }


    public String getAppId() {
        return mAppId;
    }

    public String getPaySystemId() {
        return mPaySystemId;
    }

    public String getPayTypeId() {
        return mPayTypeId;
    }

    public void setPayTypeId(String payTypeId) {
        mPayTypeId = payTypeId;
    }

    public List<PayTypeModel> getPayTypeModels() {
        return mPayTypeModels;
    }

    public void setPayTypeModels(List<PayTypeModel> payTypeModels) {
        mPayTypeModels = payTypeModels;
    }

    public String getKeyAES() {
        return mKeyAES;
    }

    public String getVectorAES() {
        return mVectorAES;
    }

    public void setPayParam(String... payParam) {

        int len = payParam.length;
        for (int i = 0; i < len; i++) {
            switch (i) {
                case 0:
                    mAppId = payParam[i];
                    break;
                case 1:
                    mKeyAES = payParam[i];
                    break;
                case 2:
                    mVectorAES = payParam[i];
                    break;
                case 3:
                    mPaySystemId = payParam[i];
                    break;
                default:
                    break;
            }
        }
    }

    @Override
    public String toString() {
        return "PayInfo{" +
                "order_channelcode='" + order_channelcode + '\'' +
                ", callType=" + callType +
                ", method='" + method + '\'' +
                ", url='" + url + '\'' +
                ", userAgent='" + userAgent + '\'' +
                ", postData='" + postData + '\'' +
                ", orderId='" + orderId + '\'' +
                ", sign='" + sign + '\'' +
                '}';
    }
}
